home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 49 / Amiga Format CD49 (2000-01-17)(Future Publishing)(GB)(Track 1 of 3)[!][issue 2000-02].iso / -in_the_mag- / banging_the_metal / ncr_scsi / cd_player_readme < prev    next >
Text File  |  1999-12-03  |  6KB  |  118 lines

  1. CD_PLAYER_BAS - the first SuperBASIC CD player!
  2. -----------------------------------------------
  3.  
  4. This little hack lets Qdos users play CD Audio tracks from a SCSI 2 CD-ROM
  5. drive. It communicates directly with the popular NCR 53c710 SCSI controller
  6. used on the Warp Engine, and can be converted for similar Zorro interfaces
  7. such as PP&S Zeus, CSA Magnum, Commodore 3091 or DKB A4091 - all it needs
  8. to know is the base address of the controller (set up in PROC SCSI_VARS).
  9.  
  10. It has been tested with an Amiga 4000 with Warp Engine and CBM/DKB A4091
  11. controllers (as fitted on the A4000T motherboard) a Toshiba 3401 and an NEC
  12. Multispin 2x CD-ROM drive (firmware revision 2111.0). Your CPU is immaterial;
  13. I've run this on a C=3640, Warp Engine and Cyberstorm 68060. Other CD drives
  14. should work as long as they have a SCSI interface, but not all drives support
  15. software eject and loading so this is disabled for non-NEC drives. If you try
  16. this on other makes of drive, start with the flag NEC=0 as the Toshiba comes
  17. closer to the published SCSI standard - although Track and Index numbers are
  18. decimal, not BCD as on the NEC drive - and please let me know how you get on.
  19.  
  20. The program needs to know where to find your SCSI controller. This depends on
  21. the number of active Zorro 3 slots on your machine and the size of each. The
  22. first slot is at address $40000000, and the Warp Engine controller is found
  23. 256K thereafter. The A4091 controller claims 16 Mb and puts the controller
  24. at the start of the second half. Version 1.1 assumes that this is the second
  25. 16 Mb card (I have a Silicon Studio digital audio card in a lower slot) so it
  26. looks for the controller at $41800000. Adjust WARP_ROM to suit your machine;
  27. Workbench:Tools/ShowConfig will display the base and size of your own boards.
  28.  
  29.  
  30. Initialisation
  31. --------------
  32.  
  33. The program looks for the CD drive at SCSI unit 1, and lets you specify an
  34. alternative unit (0..6) if it can't find a CD drive there. You can change
  35. the default by altering the assignment at the start of SCSI_VARS.
  36.  
  37. Various SCSI operations require a delay before the next action. This is
  38. implemented with SuperBASIC delay loops that perform up to TIME iterations
  39. before giving up. You may need to adjust the value of TIME to suit your CD
  40. drive or Amiga set-up. If the value is too low you're likely to see 'Phase
  41. mismatch' error reports at the bottom of the screen.
  42.  
  43. By default (DEBUGGING=0) the program displays a menu showing the CD tracks
  44. available. It reports 'track does not want to play' if you ask it to play a
  45. track that is not CD-Audio - usually this means data, at the start of most
  46. mixed-format disks. If you set the flag DEBUGGING=1 you get a messier but
  47. more informative scrolling display as each SCSI command is issued.
  48.  
  49.  
  50. Program Operation
  51. -----------------
  52.  
  53. The program is entirely controlled from the keyboard, with the minimum of
  54. key-presses. Letter keys issue the following commands:
  55.  
  56.   [S]  Start replay from the first track         ..OR..
  57.   [S]  Stop playing audio and stop the CD motor
  58.   [P]  Pause audio playback - leave the CD drive motor running
  59.   [C]  Continue playing from the position reached before a pause (roughly)
  60.   [E]  Eject the disc currently in the CD drive (NEC drives only)
  61.   [N]  Load the disc (if NEC and ejected) then read its table of contents
  62.   [Q]  Quit to SuperBASIC, leaving the CD drive playing or idle
  63.  
  64. The commands available vary depending on the current state of the program
  65. and CD drive. If there is a disc in the drive you can select a particular
  66. track by typing its number.
  67.  
  68. For disks with up to nine tracks, all you need to type is the track number,
  69. with no need for ENTER. You may need to type two digits if there are more
  70. tracks to choose from - e.g. to distinguish track 1 from track 10. Single
  71. digits that could be ambiguous are shown with a leading zero, e.g. 01. This
  72. can be selected by pressing Zero then One, or One then Enter or Space, or
  73. just Zero if there are no more than 19 tracks. A cursor appears if an extra
  74. digit is required, and the program will not continue till the user enters a
  75. digit (to make a two-digit value) or Enter, Space or Escape.
  76.  
  77.  
  78. SuperBASIC Overview
  79. -------------------
  80.  
  81. The program is structured as a collection of SuperBASIC commands which can
  82. be used directly if required. It is important to enter NCR_RESET at the
  83. start of a session or the controller may generate unexpected interrupts
  84. which lock up the Qdos emulator when they are not cleared. Thereafter the
  85. drive can be controlled directly with commands such as:
  86.  
  87.   CD_PAUSE, CD_CONTINUE, CD_EJECT, CD_PLAY <track>
  88.  
  89. Other commands will work with any specified SCSI unit - not just CD drives.
  90. These take one parameter, the SCSI unit number to be addressed:
  91.  
  92.   REQUEST_SENSE, TEST_READY, DRIVE_ABORT, DRIVE_RESET, DRIVE_IDENT
  93.  
  94. These routines display informative messages if DEBUGGING=1. There are three
  95. more routines that summarise the current state of the SCSI bus:
  96.  
  97.   BUS_FREE (FN), NOW (prints bus state), SHOW_STATE (shows control lines)
  98.  
  99. If a phase error occurs, low-level procedures can be invoked to move from
  100. the curreent phase towards BUS_FREE, e.g. GET_STATUS and MESSAGE_IN after
  101. most commands. If you are not quick the device may detect a timeout and
  102. reset the bus before you can prod it in the right direction.
  103.  
  104.  
  105. Conclusion - so far
  106. -------------------
  107.  
  108. This is only a small step in the direction of SCSI support for Amiga Qdos,
  109. but it's a start and shows how much can be done from interpreted SuperBASIC.
  110. I have used similar code to control an Archive Python SCSI DAT drive.
  111.  
  112. If you're lucky enough to have the required hardware, please try this on
  113. your Amiga and let us know how you get on.
  114.  
  115. Simon N Goodwin, 21st February 1995,
  116. updated for Amiga Qdos 3.23 release, A4091 and Toshiba drives, September 1995.
  117.  
  118.